<?php


namespace App\Exceptions;


class SmsException extends BaseException
{
	// 异常类分组
	protected int $baseCode = self::BASE_CODE_OF_SMS;
	const CODE_1101 = 1101;    //
	const CODE_1102 = 1102;    //
	const CODE_1103 = 1103;    //

	const CODE_1201 = 1201;    //

	const CODE_1301 = 1301;    // 在一分钟内输入验证码超过5次后点击“登录/注册按钮”是弹出提示：操作频率过高，请稍后使用；
	const CODE_1302 = 1302;    // 在一分钟内输入验证码超过5次后点击“注销登录”时弹出提示：操作频率过高，请稍后使用；

	const CODE_1401 = 1401;    //
	const CODE_1402 = 1402;    //

	const CODE_1501 = 1501;    // 图形验证码验证失败


	protected array $showMsg = [
		self::CODE_1101 => '获取登录验证码频率过高，请稍后重试',
		self::CODE_1102 => '获取注销验证码频率过高，请稍后重试',
		self::CODE_1103 => '获取验证码频率过高，请稍后重试',

		self::CODE_1201 => '发送验证码的手机号和登录用户不一致',

		self::CODE_1301 => '操作频率过高，请稍后重试',
		self::CODE_1302 => '操作频率过高，请稍后重试',

		self::CODE_1401 => '验证码错误',
		self::CODE_1402 => '验证码失效',

		self::CODE_1501 => '图形验证码，验证失败',
	];

	function __construct($msg = '', $code = 0)
	{
		parent::__construct($msg, $code);
	}
}